﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="files_manager.ascx.cs" Inherits="Framework.Module.UpDownLoad.Admin.files_manager" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>
<%=style %>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <Triggers>
        <asp:PostBackTrigger ControlID="drgCategory" />
    </Triggers>
    <ContentTemplate>
        <table border="0" cellpadding="0" cellspacing="10" width="100%" class="InputBox">
            <tr>
                <td width="100">
                    <asp:Label ID="lblName" runat="server" Text="Chọn danh mục" Width="100px"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="drgCategory" runat="server" Width="350px" AutoPostBack="true" OnSelectedIndexChanged="drgCategory_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Button ID="btnAdd" CausesValidation="False" CssClass="Button" runat="server" Text="Upload new file(s)" OnClick="btnAdd_Click" />
                </td>
            </tr>
            <tr>
                <td colspan="2">  
                    <asp:GridView OnRowDeleting="grvFile_RowDeleting" OnRowDataBound="grvFile_RowDataBound" ID="grvFile" runat="server" AllowPaging="True" AutoGenerateColumns="False" Width="100%" PageSize="20" CellPadding="4" ForeColor="#333333" GridLines="None">
                        <PagerSettings PageButtonCount="20" Position="TopAndBottom" />
                        <Columns>
                             <asp:TemplateField>
                                <ItemTemplate>                                    
                                    <asp:HiddenField runat="server" ID="hidden_fileid" />
                                    <asp:Label ID="abcdef" runat="server" Font-Bold="true"></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="&#160;&#160;&#160;STT">
                                <ItemTemplate>
                                &nbsp;&nbsp;&nbsp;<asp:Label ID="lblSTT" runat="server" Font-Bold="true"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle Height="25px" HorizontalAlign="Left" VerticalAlign="Middle" Width="20px" />
                                <HeaderStyle Height="30px" HorizontalAlign="Left" VerticalAlign="Middle" Width="30px" />
                            </asp:TemplateField> 
                            
                            <asp:TemplateField HeaderText="&#160;&#160;&#160;T&#234;n File (s)">
                                <ItemTemplate>
                                    &nbsp;&nbsp;&nbsp;<asp:Label ID="lblFileName" runat="server" Font-Bold="true"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle Height="25px" HorizontalAlign="Left" VerticalAlign="Middle" Width="150px" />
                                <HeaderStyle Height="30px" HorizontalAlign="Left" VerticalAlign="Middle" />
                            </asp:TemplateField> 
                             
                            <asp:TemplateField HeaderText="&#160;&#160;&#160;M&#244; tả">
                                <ItemTemplate>
                                    &nbsp;&nbsp;&nbsp;<asp:Label ID="lblTitle" runat="server" Font-Bold="true"></asp:Label>                                                    
                                </ItemTemplate>
                                <ItemStyle Height="25px" HorizontalAlign="Left" VerticalAlign="Middle" Width="120px" />
                                <HeaderStyle Height="30px" HorizontalAlign="Left" VerticalAlign="Middle" />
                            </asp:TemplateField>                            
                            <asp:TemplateField ShowHeader="false">
                                <ItemTemplate>
                                    <asp:HyperLink runat="server" ID="link_detail" Font-Underline="false"></asp:HyperLink>
                                </ItemTemplate>
                                <HeaderStyle Width="50px" Height="30px" />
                                <ItemStyle Height="25px" Width="50px" Font-Bold="True" Font-Underline="False" HorizontalAlign="Left" VerticalAlign="Middle" />
                                <FooterStyle Height="25px" />
                            </asp:TemplateField>                      
                            <asp:CommandField DeleteText="X&#243;a" ShowDeleteButton="True">
                                <HeaderStyle Width="30px" />
                                <ItemStyle ForeColor="Black" HorizontalAlign="Left" VerticalAlign="Middle" Width="30px" Font-Bold="True" Font-Underline="False" />
                            </asp:CommandField>                           
                        </Columns>
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <EditRowStyle BackColor="#999999" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>                                         
                </td>
            </tr>
        </table>
    </ContentTemplate>
</asp:UpdatePanel>
<script type="text/javascript">
function showbody(id)
{
    if(document.getElementById(id).style.display == "none")
    {
      document.getElementById(id).style.display = "block";  
    }       
    else
      document.getElementById(id).style.display = "none";
}
</script>
